import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.Timer;


public class MainWindow extends JFrame {
	private Timer _t;
	private JLabel _labTime;
	
	public MainWindow() {
		setTitle("Main window");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setLayout(new BorderLayout());
		setPreferredSize(new Dimension(450, 430));
		
		_labTime = new JLabel();
		_labTime.setIcon(new ClockIcon(150, 100));
		
		add(_labTime, BorderLayout.CENTER);
		
		pack();
		
		_t = new Timer(1000, new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				// prima versione
				// _labTime.setIcon(new ClockIcon(150,  100));
				
				// seconda versione
				//_labTime.repaint();
			}
		});
		
		// _t.start();
	}

}
